package com.hanson.common.util;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

@Data
public class PageInfo<T> {
    private List<T> data;
    private int code = 0;
    private long count;
    private String msg;

    public PageInfo(Page<T> page) {
        this.data = page.getRecords();
        this.count = page.getTotal();
    }
}
